// 这是通过appTool自动生成的rpcx代码，请勿修改
package exampleRpcSev

import (
	"context"

	"gitee.com/kinwyb/appTools/appTool/code-generate/example/rpcx/exampleRpcObj"
	"gitee.com/kinwyb/appTools/appTool/code-generate/example/server/service"
	"gitee.com/kinwyb/appTools/examples/src/assembly"
)

type arithRpcxService struct {
	Serv *service.Arith
}

func (a *arithRpcxService) ServicePath() string {
	return "arithSev"
}
func (a *arithRpcxService) Mul(reqCtx context.Context, arg *exampleRpcObj.RpcxRequestArithMul, resp *exampleRpcObj.RpcxResponseArithMul) error {
	resp.I, resp.Err = a.Serv.Mul(arg.A1, arg.B1)
	return nil
}
func (a *arithRpcxService) PageTest(reqCtx context.Context, arg *exampleRpcObj.RpcxRequestArithPageTest, resp *exampleRpcObj.RpcxResponseArithPageTest) error {
	ctx := assembly.NewRpcxContext("ArithRpcxService.PageTest", reqCtx)
	defer ctx.Finish()
	resp.S = a.Serv.PageTest(arg.D, arg.Pg, ctx.Child())
	resp.RequestPageArg = arg.Pg
	return nil
}
func (a *arithRpcxService) PageTestNoResult(reqCtx context.Context, arg *exampleRpcObj.RpcxRequestArithPageTestNoResult, resp *exampleRpcObj.RpcxResponseArithPageTestNoResult) error {
	ctx := assembly.NewRpcxContext("ArithRpcxService.PageTestNoResult", reqCtx)
	defer ctx.Finish()
	resp.M = a.Serv.PageTestNoResult(arg.D, arg.Pg, ctx.Child())
	resp.RequestPageArg = arg.Pg
	return nil
}
func (a *arithRpcxService) TestContext(reqCtx context.Context, arg string, resp *string) error {
	ctx := assembly.NewRpcxContext("ArithRpcxService.TestContext", reqCtx)
	defer ctx.Finish()
	a.Serv.TestContext(ctx.Child())
	return nil
}
func ArithMulFun(reqCtx context.Context, arg *exampleRpcObj.RpcxRequestArithMulFun, resp *exampleRpcObj.RpcxResponseArithMulFun) error {
	resp.I = service.ArithMulFun(arg.A1, arg.B1)
	return nil
}
func NoResult(reqCtx context.Context, arg string, resp *string) error {
	service.NoResult()
	return nil
}
func GoFunc(reqCtx context.Context, arg string, resp *string) error {
	go service.GoFunc()
	return nil
}
func PageTest(reqCtx context.Context, arg *exampleRpcObj.RpcxRequestPageTest, resp *exampleRpcObj.RpcxResponsePageTest) error {
	ctx := assembly.NewRpcxContext("exampleRpcSev.PageTest", reqCtx)
	defer ctx.Finish()
	service.PageTest(arg.Pg, ctx.Child())
	resp.RequestPageArg = arg.Pg
	return nil
}
